from flask import Blueprint, jsonify

from utils.config_utils import config

# 服务注册到蓝图，蓝图再注册到main.py的app，由main分发http请求
bp_health_check = Blueprint('health_check', __name__)


@bp_health_check.route('/dhu-ai/api/health/check', methods=['GET'])
def health_check_service():
    response = {
        "healthy": True,
        "environment": config.get("environment")
    }

    return jsonify(response)
